#pragma once

#include <iostream>
#include <string>
#include <ctime>    // 包含 time_t, tm, localtime, time 函数


// 您的原始枚举保持不变
enum {
    DEBUG,
    INFO,
    WARNING,
    ERROR,
    FATAL
};

#define LOG(LEVEL, MESSAGE) logPrint(#LEVEL, MESSAGE, __FILE__, __LINE__);


inline void logPrint(const std::string& level, const std::string& msg, const std::string& file, int line) {
    std::cout << file << ":" << line << ": [" << level << "] [" << time(nullptr) << "] " << msg << std::endl;
}